import request from '@/axios/request'
import url from '@/axios/url'
const { mesUrl, adminUrl, wmsUrl } = url()
// 导出url
export const exportUrl = `${mesUrl}mesProdOrder/export`

/**
 * 新增
 * @param data
 * @returns {*|Promise<*>}
 */
export function repairItemCreate(data = '') {
  return request({
    url: `${mesUrl}repair/item/c`,
    method: 'post',
    data: data
  })
}

/**
 * 修改
 * @param data
 * @returns {*|Promise<*>}
 */
export function repairItemUpdate(data = '') {
  return request({
    url: `${mesUrl}repair/item/u`,
    method: 'post',
    data: data
  })
}

/**
 * 分页
 * @param data
 * @returns {*|Promise<*>}
 */
export function repairItemPage(data = {}) {
  return request({
    url: `${mesUrl}repair/item/page`,
    method: 'get',
    params: data
  })
}
/**
 * 不分页
 * @param data
 * @returns {*|Promise<*>}
 */
export function repairItemList(data = {}) {
  return request({
    url: `${mesUrl}repair/item/list`,
    method: 'get',
    params: data
  })
}
/**
 * 删除
 * @param id
 * @returns {*|Promise<*>}
 */
export function repairItemDeleteById(id = '') {
  return request({
    url: `${mesUrl}repair/item/d/${id}`,
    method: 'post'
  })
}
